package jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Scanner;

public class ReDemo {
    public static void main(String[] args) {
        try(
                Connection connection = DBUtil.getConnection();
        ) {
            Statement statement = connection.createStatement();
            Scanner scanner = new  Scanner(System.in);
            String  uname = scanner.nextLine();
            String  passw = scanner.nextLine();
            String  nickn = scanner.nextLine();
            int age = scanner.nextInt();
            String sql = "INSERT INTO userinfo(username,password,nickname,age)" +
                    "VALUES ('scanner.nextLine()','scanner.nextLine()','scanner.nextLine()','scanner.nextInt()')";
            statement.execute(sql);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
